package com.mcay.springcloud.service;

import com.mcay.springcloud.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "cloud-payment-service")
public interface PaymentFeignService {
    /**
     * 根据id查询
     *
     * @param id
     * @return
     */

    @GetMapping("/payment/get/{id}")
    public CommonResult getPaymentById(@PathVariable("id") Long id);
    /**
     * 模拟feign超时
     *
     * @return
     */

    @GetMapping(value = "/feign/timeout")
    public String paymentFeignTimeout();
}
